package com.aaa.oa.controller;

import com.aaa.common.entity.Book;
import com.aaa.oa.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：杨
 * @date ：Created in 2020/7/21 16:48
 * @description：
 * @modified By：
 * @version:
 */
@RestController
@RequestMapping("book")
public class BookController {
    @Autowired
    private BookService bookService;
    @RequestMapping("list")
    public List<Book> selectBook(){
        List<Book> books = bookService.selectBook();
        Book book=new Book();
        book.setId(3333333);
        book.setBookName("name333333333");
        book.setBookPrice(3333333);
        books.add(book);
        return books;
    }
}
